<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>

<h1>
	<fmt:message key="permission.view.title" />
</h1>
<a href="new"><fmt:message key="permission.view.addbutton" />
</a>
<br />
<br />

<table collspadding="0px" width="800px">
	<tr>
		<th width="30px"><fmt:message key="permission.form.id" />
		</th>
		<th width="100px"><fmt:message key="permission.form.name" />
		</th>
		<th width="100px"><fmt:message key="permission.form.createdon" />
		</th>
		<th width="20px">&nbsp;</th>
	</tr>
	<c:url var="editPermissionUrl" value="/admin/perm/" />
	<c:url var="deletePermissionUrl" value="/admin/perm/delete/" />
	<c:forEach items="${permissions}" var="permission">
		<tr>
			<td><c:out value="${permission.id}" />
			</td>
			<td><a href="${editPermissionUrl}${permission.id}"><c:out
						value="${permission.name}" />
			</a>
			</td>
			<td><c:out value="${permission.createdOn}" />
			</td>
			<td><a href="${deletePermissionUrl}${permission.id}"><fmt:message
						key="permission.view.deletebutton" />
			</a>
			</td>
		</tr>
	</c:forEach>
</table>
